Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrates topic-viewer-navbar-breadcrumb, subtopics-list, topic-viewer-page, practice-tab, topic-viewer-stories-list to angular components and introduces angular2+ material css. #9957

Merged
merged 57 commits into from
Aug 7, 2020

Conversation

srijanreddy98
Copy link
Member

@srijanreddy98 srijanreddy98 commented Jul 19, 2020

Overview

  1. This PR fixes or fixes part of Migrate directives/controllers to Angular components #9749.
  2. This PR does the following:

Initial implementation by @orthodoxparadox #9790.

Material CSS doc:
PR Doc: https://docs.google.com/document/d/1UoCOC7XNhCZrWIMPAoR5Xex28OYWzteqXrqCU9gRUHQ/edit?usp=sharing

  • Adds a CSS file for angular material.
  • This CSS shouldn't be modified as it is generated.

Steps to generate this file:
How I generated this:

Video: https://drive.google.com/file/d/1bRA0824CV6cDNYANcX2KT4skNilKdynh/view?usp=sharing

  1. Clone angular components: git clone https://github.com/angular/components.git
  2. cd components
  3. cd src/material/core/theming/prebuilt/
  4. code . (if you use vscode or open this folder in the code editor of your choice).
  5. open any of the four files present in the folder.
  6. Generate and copy a palette from http://mcg.mbitson.com/#!?oppia=%23009688 and paste it in the scss file.
  7. Change md - mat and change primary and secondary variables in scss file.
  8. Change $accent varibale value to be mat-pallete($mat-blue)
  9. Install node-sass (npm i -g node-sass)
  10. Run node-sass ./deeppurple-amber.scss oppia-material.css

Changes:

Before After
image image
image image
image image
image image
image image

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

PR Pointers

  • Oppiabot will notify you when you don't add a PR_CHANGELOG label. If you are unable to do so, please @-mention a code owner (who will be in the Reviewers list), or ask on Gitter.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays
  • Never force push. If you do, your PR will be closed.

@srijanreddy98
Copy link
Member Author

@mschanteltc here are the screenshots:
Revision Tab:
image
image

Practice Tab:
image

WDYT?

@mschanteltc
Copy link

@mschanteltc here are the screenshots:
Revision Tab:
image
image

Practice Tab:
image

WDYT?

The Revision Tab looks great! Just a few more notes about the "Start" button in the Practice Tab:

  • Use medium weight font for "Start"
  • I can't tell what the measurement of the rounded corners are, but do they match that of the white container's? They still look too "rounded" to me.

@srijanreddy98
Copy link
Member Author

@mschanteltc I will change the font-weight/size but the border-radius is correct IMO. I checked with the current develop:

Develop My Branch
image image

@oppiabot
Copy link

oppiabot bot commented Aug 3, 2020

Hi @srijanreddy98. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

@srijanreddy98
Copy link
Member Author

@mschanteltc PTAL!

@mschanteltc
Copy link

@mschanteltc PTAL!

The corner radius lgtm! Was there a change to the font weight? I might've missed it.

@mschanteltc
Copy link

@mschanteltc PTAL!

As long as the corner radius of the button matches the might white container, it LGTM! Was there a change to the font weight? I might've missed it.

@srijanreddy98
Copy link
Member Author

@mschanteltc I have updated the font size.

image

WDYT

@mschanteltc
Copy link

@mschanteltc I have updated the font size.

image

WDYT

Hmm I still don't see the medium weight in the "Start" font. It still looks normal to me. Does a "medium" weight exist in the font library?

@srijanreddy98
Copy link
Member Author

@mschanteltc how does it look now?
image

@mschanteltc
Copy link

@mschanteltc how does it look now?
image

Thanks for the update! The font weight looks good now. Is it possible we can space out the characters in "START" a little more so we can see a small gap in between each one?

Copy link
Member

@DubeySandeep DubeySandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the code owner files and left two minor comments PTAL! (Feel free to merge this PR and fix one minor issue in any other PR!)

@@ -354,6 +355,7 @@
/core/README.md @ankita240796
/extensions/README.md @ankita240796
/scripts/README.md @ankita240796
/core/templates/css/README.md @srijanreddy98 @bansalnitish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add in sorted order!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -39,6 +39,7 @@
'core/tests/release_sources/tmp_unzip.zip', 'scripts/linters/test_files/*',
'core/tests/release_sources/tmp_unzip.tar.gz',
'core/templates/combined-tests.spec.ts',
'core/templates/css/oppia-material.css',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it here to be ignored by the linter because it is a generated CSS file and it was raising a lot of lint issues.

@DubeySandeep DubeySandeep removed their assignment Aug 7, 2020
@srijanreddy98
Copy link
Member Author

@mschanteltc PTAL!

image

@mschanteltc
Copy link

@mschanteltc PTAL!

image

LGTM!

@srijanreddy98 srijanreddy98 merged commit 9138dfd into oppia:develop Aug 7, 2020
@mschanteltc
Copy link

I missed this, but for the Lessons Tab, the Chapter names should be aligned when a new line starts. Can we fix this so that the textbox aligns with the line, while leaving enough room on the left for a checkmark? (mock)

@seanlip
Copy link
Member

seanlip commented Aug 11, 2020

Hi @mschanteltc, this PR is already merged. Could you please file a new issue instead?

Thanks!

shavavo pushed a commit to shavavo/oppia that referenced this pull request Aug 20, 2020
…-page, practice-tab, topic-viewer-stories-list to angular components and introduces angular2+ material css. (oppia#9957)

* Migrated PracticeTabComponent

* Fixed references

* Migrated TopicViewerNavbarBreadcrumb

* Added untracked files

* Migrates StoriesListComponent

* Fixed frontend coverage

* Styling changes + component addition

* Migrates subtopics list component

* Fixed frontend coverage

* Fixed ngfor

* Fix html

* Fix translates and return types for ngOnInit

* Fixed coverage check

* Removes translation services following PR oppia#9842 + other minor fixes

* Removed fully covered files

* Undo constants

* Oppia-material

* Don't lint oppia-mat css

* Lint check fixes 😭

* Material

* Merge branch 'angular-mat-css' into tv-migrate

* Changes

* Changes

* Changes

* Changes to shared components

* fix main component file

* Change subtopics component styling

* Linter 😑

* Fully covered files 😩

* Update story summary

* Fix layout issues

* Files seem to fully cover themselves 😂

* Review

* Review

* Review

* Review

* Change button and checkbox styles

* Update readme.ms

* Review

* Style changes

* Style changes

* Style changes

* Style changes

* Changes

* Review

Co-authored-by: Madhav Sainanee <msainanee@google.com>
Co-authored-by: Madhav Sainanee <30462390+orthodoxparadox@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet